package cn.yuanqiao.archive.guangpanguanli.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 光盘台账对象 YQGPTZ
 * 
 * @author sy
 * @date 2023-10-07
 */
public class YqGptz extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQGPTZ";

    public YqGptz() {
        String userCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(userCode)){
//            throw new ServiceException("TenantCode is null");
            this.tableName = "YQGPTZ";
        }else {
            this.tableName = userCode.toUpperCase()+BIGTABLENAME;
//            this.tableName = "YQGPTZ";
        }
    }

    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** ID */
    @IdAnnotation
    private Long id;

    /** 刻录人 */
    @Excel(name = "刻录人")
    private String burner;

    /** 刻录时间 */
    @JsonFormat(pattern ="yyyy-MM-dd" ,timezone = "GMT+8")
    @Excel(name = "刻录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date burningTime;

    /** 刻录地点 */
    @Excel(name = "刻录地点")
    private String burningLocation;

    /** 刻录内容 */
    @Excel(name = "刻录内容")
    private String burnContent;

    /** 光盘张数（张） */
    @Excel(name = "光盘张数")
    private Integer number;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 创建人ID */
//    @Excel(name = "创建人ID")
    private Long creatorId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    /** 最后修改人 */
//    @Excel(name = "最后修改人")
    private Long lastupdater;

    /** 最后修改时间 */
//    @Excel(name = "最后修改时间")
    private Date lastupdateTime;

    /** 是否删除 */
//    @Excel(name = "是否删除")
    private Integer isDel;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setBurner(String burner) 
    {
        this.burner = burner;
    }

    public String getBurner() 
    {
        return burner;
    }

    public void setBurningTime(Date burningTime) 
    {
        this.burningTime = burningTime;
    }

    public Date getBurningTime() 
    {
        return burningTime;
    }
    public void setBurningLocation(String burningLocation) 
    {
        this.burningLocation = burningLocation;
    }

    public String getBurningLocation() 
    {
        return burningLocation;
    }
    public void setBurnContent(String burnContent) 
    {
        this.burnContent = burnContent;
    }

    public String getBurnContent() 
    {
        return burnContent;
    }
    public void setNumber(Integer number)
    {
        this.number = number;
    }

    public Integer getNumber()
    {
        return number;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setCreatorId(Long creatorId)
    {
        this.creatorId = creatorId;
    }

    public Long getCreatorId() 
    {
        return creatorId;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setLastupdater(Long lastupdater)
    {
        this.lastupdater = lastupdater;
    }

    public Long getLastupdater() 
    {
        return lastupdater;
    }

    public Date getLastupdateTime() {
        return lastupdateTime;
    }

    public void setLastupdateTime(Date lastupdateTime) {
        this.lastupdateTime = lastupdateTime;
    }

    public void setIsDel(Integer isDel)
    {
        this.isDel = isDel;
    }

    public Integer getIsDel() 
    {
        return isDel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("burner", getBurner())
            .append("burningTime", getBurningTime())
            .append("burningLocation", getBurningLocation())
            .append("burnContent", getBurnContent())
            .append("number", getNumber())
            .append("remark", getRemark())
            .append("creatorId", getCreatorId())
            .append("createTime", getCreateTime())
            .append("lastupdater", getLastupdater())
            .append("lastupdateTime", getLastupdateTime())
            .append("isDel", getIsDel())
            .toString();
    }
}
